import { Limits } from '@boticord/consts'
import { IsInt, IsString, Length, Max, Min } from 'class-validator'
import { IsOptionalString } from '@boticord/common/is-optional-string.decorator'

export class UpdateReviewDto {
  @IsOptionalString()
  @IsString()
  @Length(Limits.MinCommentLength, Limits.MaxCommentLength)
  declare content?: string

  @IsInt()
  @Min(Limits.MinRating)
  @Max(Limits.MaxRating)
  declare rating: number
}